<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ include file="/pub/head_both.inc"%>
<title>模块管理</title>
</head>
<body>
	<!-- 这里定义了转发进入的TAB对应的菜单ID，也是TAB的属性ID值 -->
	<input type="hidden" name="menuId" id="menuId" value="${param.menuId}" />

	<!-- Grid List-->
	<div id="resourceOprForModuleGrid"></div>
   
	<script type="text/javascript">
	var win = parent || window;
	
 	function badousoft(){}
		badousoft.ajax=function(s){
	    jQuery.ajax(s);
	}	
  		
    var modulegrid = $("#resourceOprForModuleGrid").ligerGrid({
          columns: [
		      {display:"模型编码",name:"code",width:150,type:"text",align:"center",isSort : true} ,
		      {display:"模型名称",name:"name",width:150,type:"text",align:"center",isSort : true },
		      {display:"操作版本",name:"version",width:150,type:"text",align:"center",isSort : true,
		    	   render: function (row) {
		    		   var result = '';
		    		   result = row.versionCode + row.version1 + row.version2 + row.version3 ; 
		    		   return result;
		       	   }
		       },
		      {display:"操作类型",name:"userName",width:70,type:"text",align:"center",isSort : true,
		    	   render: function(row) {
		    		   if (row.operType == 0) return '上传模型'
		    		   
		    		   if (row.updateType == 0) return '下载文件'
		    		   if (row.updateType == 1) return '覆盖更新'
		    		   if (row.updateType == 2) return '下载模型'
		    	   }} ,
		      {display:"操作结果",name:"status",width:70,type:"text",align:"center",
		    	  render: function (row) {
		    		  	var status = row.status
		    		    if (row.operType == 0) {
		    		    	switch (status) {
			    		    	case 0: return '未上传'
			    		    	case 1: return '上传中'
			    		    	case 2: return '成功'
			    		    	case 3: return '失败'
		    		    	}
		    		    } else if (row.operType == 1) {
		    		    	switch (status) {
			    		    	case 0: return '未下载'
			    		    	case 1: return '下载中'
			    		    	case 2: return '成功'
			    		    	case 3: return '失败'
			    		    	case 4: return '更新中'
			    		    	case 5: return '成功'
			    		    	case 6: return '失败'
		    		    	}
		    		    }
		       	   }
		      },
		      {display:"错误原因",name:"failMsg",width:150,type:"text",align:"center",isSort : true} 
   		  ],
          dataAction: 'server',toolbar: null,
          url: '${baseURL}/plateform/resourceoperlist/listJSON.do?type=0&resourceId=${resourceId}', sortName: 'code',
          width: '98%', height: '65%',heightDiff:20, checkbox: true,
          pageParmName:"pageNo",pageSizeOptions:[${pageOptions}], pagesizeParmName:"perPageSize",
          rowHeight:23,rownumbers:true,isScroll:true,sortnameParmName:"sortName",
          sortorderParmName:"sortOrder",checkbox:true,pageSize: ${pageSize}
    });
    
   
  </script>
</body>
</html>